/* 
 * File:   KNNTraversal.h
 * Author: liuyi
 *
 * Created on October 8, 2009, 11:14 AM
 */

#ifndef _KNNTRAVERSAL_H
#define	_KNNTRAVERSAL_H

#include "KNN.h"

class KNNTraversal: public KNN {
public:

    void store2File(const char *modelPath);

    static KNNTraversal * loadFromFile(const char *modelPath) throw(FileNotFoundException);

    void classify(Sample &sample);

    /**
     *@param copyList if need a exactly copy of trained sampleList, or load from file, it is true, otherwise false
     */
    KNNTraversal(SampleSpace &sampleSpace, bool copyList = true): KNN(sampleSpace, copyList) {
    }

    ~KNNTraversal() {
    }

private:

    KNNTraversal();

};

#endif	/* _KNNTRAVERSAL_H */

